﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DalGen.ConnForm;

namespace DalGen
{
    public partial class DBSourceForm : Form
    {
        string rdbstr = "";
        public DBSourceForm()
        {
            InitializeComponent();
            rdbSql.CheckedChanged += new EventHandler(rdb_CheckedChanged);
            rdbMysql.CheckedChanged += new EventHandler(rdb_CheckedChanged);
        }

        void rdb_CheckedChanged(object sender, EventArgs e)
        {
            rdbstr = ((RadioButton)sender).Text.ToString();

        }

        private void btnNext_Click(object sender, EventArgs e)
        {
            switch (rdbstr)
            {
                case "SQL Server":
                    SQLForm sql = new SQLForm();
                    sql.Show();
                    break;
                case "My SQL":
                    MySQLForm mysql = new MySQLForm();
                    mysql.Show();
                    break;
                default:
                    break;
            }
            this.Hide();

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
            ManageForm form = new ManageForm();
            form.Show();
        }
    }
}
